// import Taro from '@tarojs/taro'
import { useCallback } from 'react'
import { useRequest } from 'ahooks'
import callFunc from '../unit/callFunc'
//使用useRequest的options声明
export default function useCallFunc(name: string, options: any = {}): any {
  const getData = useCallback(
    (params) => {
      return callFunc(name, params)
    },
    [name]
  )
  return useRequest(getData, options)
}
